OTAsyncOpenInternetServices
Opens the TCP/IP service provider and returns an internet services reference. This function runs asynchronously.C INTERFACE
OSStatus OTAsyncOpenInternetServices (OTConfiguration *cfig, OTOpenFlags oflag, OTNotifyProcPtr proc, void *contextPtr);C++ INTERFACE
None. C++ clients use the C interface to this function.PARAMETERS
cfig
- A pointer to a network configuration structure. Specify
nil
for this parameter to have the function provide the network configuration structure for you. You can also obtain this pointer by using the constantkDefaultInternetServicesPath
for this parameter.oflag
- Reserved. Must be set to 0.
proc
- A pointer to your notifier function. The TCP/IP service provider passes the internet services reference to your notifier function in the
cookie
parameter.contextPtr
- A pointer for your use. The TCP/IP service provider passes this value unchanged to your notifier function.
DESCRIPTION
You must open the TCP/IP service provider before calling any TCP/IP services function other than the address utility functions. You must provide the internet services reference when calling any of these non-utility functions. TheOTAsyncOpenInternetServices
function also sets the mode of all other TCP/IP service provider functions as asynchronous.If you want to set an option as part of the configuration string, you should translate the option's constant name, given in the header files, into a string that the configuration functions can parse. For the TCP/IP options, Table 8-2 provides the constant name used in "Options," beginning on page 8-28 and the value to use in the configuration string.
COMPLETION EVENT CODES
T_OPENCOMPLETE 0x20000007 The OTAsyncOpenInternetServices
function has completed.SEE ALSO
TheOTOpenInternetServices
function (described next) is a synchronous version of the TCP/IP open services function.The network configuration structure and
OTCreateConfiguration
function are described in the chapter "Configuration Management" in this book.Use the
OTCloseProvider
function, described in the chapter "Endpoints" in this book, to close a TCP/IP service provider when you are finished using it.